<template>
	<div class="right-cps-view">
		<div class="tbs-view">
			<el-button v-for="(item, index) in tabs" :key="index" @click="activeBtn = index"
				:type="activeBtn == index ? 'primary' : ''"
				:disabled="(item.disabled ? true : false) || (index > 0 && ('listEmpty' == tableSelectRow && saveBTN))">
				{{ item.title }}
			</el-button>
			<!-- -弹框是否出现-{{ rightViewFlag }}--
			-是否修改-{{ DataChange }}-- -->
		</div>
		<!-- content -->
		<div class="container">
			<tabs-detail v-if="activeBtn == 0" :offerComboxData="offerComboxData" :tableSelectRow="tableSelectRow"
				@changeType="changeType" @changeBTN="changeBTN" @isDisabledFlgOne="isDisabledFlgOne"
				:isBtnShow="$hasEditPermission('/BHView')" ref="tab1" @DataChangeFn="DataChangeFn"
				@isConfirmingFn="isConfirmingFn"></tabs-detail>
			<tabs-plan v-if="activeBtn == 1" :offerComboxData="offerComboxData" :tableSelectRow="tableSelectRow"
				@DataChangeFn="DataChangeFn" @isConfirmingFn="isConfirmingFn"></tabs-plan>
			<!-- <tabs-pic v-if="activeBtn == 2" :offerComboxData="offerComboxData" :tableSelectRow="tableSelectRow" @DataChangeFn="DataChangeFn" @isConfirmingFn="isConfirmingFn"></tabs-pic> -->
			<tabs-tabel ref="tab3" v-show="activeBtn == 2" :offerComboxData="offerComboxData"
				:tableSelectRow="tableSelectRow" @DataChangeFn="DataChangeFn"
				@isConfirmingFn="isConfirmingFn"></tabs-tabel>
		</div>

		<!-- footer -->
		<footer class="footer-view">
			<!-- <button v-show="isBtnShow">Cancel</button> -->
			<el-button type="primary" v-show="$hasEditPermission('/BHView')" @click="_save(true)" :disabled="saveBTN">編集内容を保存</el-button>
			<el-button type="warning" @click="onCloseClick">
				{{ $t("message.public.close") }}
			</el-button>
		</footer>
	</div>
</template>

<script>
import tabs_detail from "./tabs/Tab_1.vue";
import tabs_plan from "./tabs/Tab_2.vue";
import tabs_tabel from "./tabs/Tab_4.vue";
import tabs_pic from "./tabs/Tab_3.vue";
import {
	getOfferCombox, UpdResOfferEjectBookAssData, addResOfferEjectNextDataMsg,
	addResOfferEjectDataVerify, offerDetiaRequiredMsgTips, offerDetiaMsgTips,
	AddResOfferEjectNextODataMsg, AddResOfferEjectNextTDataMsg
} from "@/api/api";
import { getLocalStorage } from "@/utils/storage";
import eventBus from "@/eventBus/bus";
import { getCookie } from "@/utils/cookie";
import { showLoading, hideLoading } from "@/utils/loading";

export default {
	name: "TabsCompontens",
	props: [
		"tableSelectRow", "rightViewFlag"
	],
	data() {
		return {
			DataChange: false,
			isConfirming: false,

			tabs: [
				{ title: this.$t("message.rightMessage.tabs.label_1") },
				{ title: this.$t("message.rightMessage.tabs.label_2"), disabled: true },
				// { title: this.$t("message.rightMessage.tabs.label_3") },
				{ title: this.$t("message.rightMessage.tabs.label_4"), disabled: true },
			],
			activeBtn: 0,
			offerComboxData: {},
			isChange: false,
			type: 2,
			saveBTN: false,
			dis: true
		};
	},
	components: {
		"tabs-detail": tabs_detail,
		"tabs-plan": tabs_plan,
		"tabs-tabel": tabs_tabel,
		"tabs-pic": tabs_pic,
	},
	computed: {
		macCodeValue() {
			return this.$store.state.macCode;
		},
	},
	watch: {
		// '$store.state.isStop.name': function (nVal, oVal) {
		// 	//你需要执行的代码
		// 	console.log(nVal, oVal);
		// 	if (nVal == 'active') {
		// 		this._save();
		// 	}
		// },
		tableSelectRow: {
			deep: true,
			immediate: true,
			handler: function (newV, oldV) {
				if (this.activeBtn != 0) {
					this.activeBtn = 0;
					setTimeout(() => {
						this.$refs.tab1.getResOfferEjectDataApi();
					}, 300);
				}

			},
		},

		macCodeValue: {
			deep: true,
			handler: function (newV, oldV) {
				if (this.activeBtn != 0) {
					this.activeBtn = 0;
					setTimeout(() => {
						this.$refs.tab1.getResOfferEjectDataApi();
					}, 300);
				}
			},
		},
		activeBtn: {
			deep: true,
			handler: function (newV, oldV) {
				try {
					this.$refs.tab3.reSetTableFn();
				} catch (error) {
					//
				}
			},
		},
	},
	methods: {
		isConfirmingFn(e) {
			this.isConfirming = e;
		},
		DataChangeFn(e) {
			this.DataChange = e;
		},
		isDisabledFlgOne(e) {
			if (e == 1) {
				this.tabs[1].disabled = true;
				this.tabs[2].disabled = true;
			} else if (e == 0) {
				this.tabs[1].disabled = false;
				this.tabs[2].disabled = false;
			}
		},
		changeBTN(e) {
			console.log(e);

			this.saveBTN = e;
		},
		//2保存1新增
		changeType(e) {
			this.type = e;
			this.saveBTN = true;
		},
		_save(isSaveBtn) {
			// if (this.isConfirming) {
			// 	return
			// }
			this.isConfirming = true;

			// if (this.activeBtn == 2) {
			// 	this.$refs.tab3.saveFn(isSaveBtn);
			// 	return
			// }
			// console.log(this.type);
			this.save(this.type, isSaveBtn);
		},
		async save(flg, isSaveBtn) {

			//offerDetiaMsgTips目视详细 新增/修改/削除前 提示信息获取 2
			let tipMSG = await this.getDelMsg(flg);
			this.$confirm(tipMSG, '', {
				confirmButtonText: 'OK',
				cancelButtonText: 'Cancel',
				type: 'warning'
			}).then(async () => {

				//必填项提示信息获取 1
				let E_MST = JSON.parse(localStorage.getItem("E_MST"));
				let getMSG = '';
				console.log(E_MST.ssnDate)
				if (E_MST.ssnDate == '' || !E_MST.ssnDate) {
					getMSG = this.$t("message.rightMessage.tab1.label_1")
				} else if (E_MST.oCodName == '' || !E_MST.oCodName) {
					getMSG = this.$t("message.rightMessage.tab1.label_5")
				}
				let getMsgJson = { label: getMSG }
				if (getMSG != '') {
					let reqMSG = await this.offerDetiaRequiredMsgTipsApi(getMsgJson);

					this.$alert(reqMSG, {
						confirmButtonText: 'OK',
						type: 'warning',
					})
					//  导航条误
					eventBus.$emit('isNavChangeErrorFn');
					//  搜索框索引误
					eventBus.$emit('backParamsForLeftView');
					return
				}


				//新增/修改 结果要约/次回计划(验证，预先执行) 3
				let verMSG = await this.addResOfferEjectDataVerifyApi(flg);
				console.log(2222222222222);
				//code 为0提示，拦截，否则就过
				if (verMSG.data.code == 0) {
					//新增/修改 结果要约/次回计划 前验证 4
					let nextRes = await this.addResOfferEjectNextDataMsgApi(flg);
					if (nextRes.code == 451) {
						this.$confirm(nextRes.msg, '', {
							confirmButtonText: 'OK',
							cancelButtonText: 'Cancel',
							type: 'warning'
						}).then(() => {
							// this.$message({
							// 	type: 'success',
							// 	message: '削除成功!'
							// });
							//新增/修改 结果要约/次回计划 前验证 5
							let fiveRes = this.AddResOfferEjectNextODataMsgApi(flg);
							if (fiveRes.code == 451) {
								this.$confirm(fiveRes.msg, '', {
									confirmButtonText: 'Cancel',
									cancelButtonText: 'OK',
									type: 'warning'
								}).then(() => {
									this.addResOfferEjectDataApi(flg, isSaveBtn);
								}).catch(() => {
									//  导航条误
									eventBus.$emit('isNavChangeErrorFn');
									//  搜索框索引误
									eventBus.$emit('backParamsForLeftView');
									return
								});
							} else {

								let sixRes = this.AddResOfferEjectNextTDataMsgApi(flg);
								if (sixRes.code == 451) {
									this.$confirm(sixRes.msg, '', {
										confirmButtonText: 'Cancel',
										cancelButtonText: 'OK',
										type: 'warning'
									}).then(() => {
										this.addResOfferEjectDataApi(flg, isSaveBtn);
									}).catch(() => {
										//  导航条误
										eventBus.$emit('isNavChangeErrorFn');
										//  搜索框索引误
										eventBus.$emit('backParamsForLeftView');
										return
									});
								} else {
									this.addResOfferEjectDataApi(flg, isSaveBtn);
								}
							}
							//更新最后一步
							// this.addResOfferEjectDataApi(type);
						}).catch(() => {
							//  导航条误
							eventBus.$emit('isNavChangeErrorFn');
							//  搜索框索引误
							eventBus.$emit('backParamsForLeftView');
							return
						});
					} else {
						//新增/修改 结果要约/次回计划 前验证 5
						let fiveRes = this.AddResOfferEjectNextODataMsgApi(flg);
						if (fiveRes.code == 451) {
							this.$confirm(fiveRes.msg, '', {
								confirmButtonText: 'Cancel',
								cancelButtonText: 'OK',
								type: 'warning'
							}).then(() => {
								this.addResOfferEjectDataApi(flg, isSaveBtn);
							}).catch(() => {
								//  导航条误
								eventBus.$emit('isNavChangeErrorFn');
								//  搜索框索引误
								eventBus.$emit('backParamsForLeftView');
								return
							});
						} else {

							let sixRes = this.AddResOfferEjectNextTDataMsgApi(flg);
							if (sixRes.code == 451) {
								this.$confirm(sixRes.msg, '', {
									confirmButtonText: 'Cancel',
									cancelButtonText: 'OK',
									type: 'warning'
								}).then(() => {
									this.addResOfferEjectDataApi(flg, isSaveBtn);
								}).catch(() => {
									//  导航条误
									eventBus.$emit('isNavChangeErrorFn');
									//  搜索框索引误
									eventBus.$emit('backParamsForLeftView');
									return
								});
							} else {
								this.addResOfferEjectDataApi(flg, isSaveBtn);
							}
						}
					}
				} else if (verMSG.data.code == 1) {

					this.$alert(verMSG.data.msg, '', {
						confirmButtonText: 'OK',
						cancelButtonText: 'Cancel',
						type: 'warning'
					}).then(async () => {
						//新增/修改 结果要约/次回计划 前验证 4
						let nextRes = await this.addResOfferEjectNextDataMsgApi(flg);
						if (nextRes.code == 451) {
							this.$confirm(nextRes.msg, '', {
								confirmButtonText: 'OK',
								cancelButtonText: 'Cancel',
								type: 'warning'
							}).then(() => {
								// this.$message({
								// 	type: 'success',
								// 	message: '削除成功!'
								// });
								//新增/修改 结果要约/次回计划 前验证 5
								let fiveRes = this.AddResOfferEjectNextODataMsgApi(flg);
								if (fiveRes.code == 451) {
									this.$confirm(fiveRes.msg, '', {
										confirmButtonText: 'Cancel',
										cancelButtonText: 'OK',
										type: 'warning'
									}).then(() => {
										this.addResOfferEjectDataApi(flg, isSaveBtn);
									}).catch(() => {
										//  导航条误
										eventBus.$emit('isNavChangeErrorFn');
										//  搜索框索引误
										eventBus.$emit('backParamsForLeftView');
										return
									});
								} else {

									let sixRes = this.AddResOfferEjectNextTDataMsgApi(flg);
									if (sixRes.code == 451) {
										this.$confirm(sixRes.msg, '', {
											confirmButtonText: 'Cancel',
											cancelButtonText: 'OK',
											type: 'warning'
										}).then(() => {
											this.addResOfferEjectDataApi(flg, isSaveBtn);
										}).catch(() => {
											//  导航条误
											eventBus.$emit('isNavChangeErrorFn');
											//  搜索框索引误
											eventBus.$emit('backParamsForLeftView');
											return
										});
									} else {
										this.addResOfferEjectDataApi(flg, isSaveBtn);
									}
								}
								//更新最后一步
								// this.addResOfferEjectDataApi(type);
							}).catch(() => {
								//  导航条误
								eventBus.$emit('isNavChangeErrorFn');
								//  搜索框索引误
								eventBus.$emit('backParamsForLeftView');
								return
							});
						} else {
							//新增/修改 结果要约/次回计划 前验证 5
							let fiveRes = this.AddResOfferEjectNextODataMsgApi(flg);
							if (fiveRes.code == 451) {
								this.$confirm(fiveRes.msg, '', {
									confirmButtonText: 'Cancel',
									cancelButtonText: 'OK',
									type: 'warning'
								}).then(() => {
									this.addResOfferEjectDataApi(flg, isSaveBtn);
								}).catch(() => {
									//  导航条误
									eventBus.$emit('isNavChangeErrorFn');
									//  搜索框索引误
									eventBus.$emit('backParamsForLeftView');
									return
								});
							} else {

								let sixRes = this.AddResOfferEjectNextTDataMsgApi(flg);
								if (sixRes.code == 451) {
									this.$confirm(sixRes.msg, '', {
										confirmButtonText: 'Cancel',
										cancelButtonText: 'OK',
										type: 'warning'
									}).then(() => {
										this.addResOfferEjectDataApi(flg, isSaveBtn);
									}).catch(() => {
										//  导航条误
										eventBus.$emit('isNavChangeErrorFn');
										//  搜索框索引误
										eventBus.$emit('backParamsForLeftView');
										return
									});
								} else {
									this.addResOfferEjectDataApi(flg, isSaveBtn);
								}
							}
						}
					}).catch(() => {

					});
				} else {
					this.$alert(verMSG.data.msg, '', {
						confirmButtonText: 'OK',
						type: 'warning',
					});
					//  导航条误
					eventBus.$emit('isNavChangeErrorFn');
					//  搜索框索引误
					eventBus.$emit('backParamsForLeftView');
					return
				}



			}).catch(() => {
				try {
					var tempFn = null;
					tempFn = this.$store.state.isCurrentFn.toString();
				} catch (error) {
					//
				}
				if (isSaveBtn) {
					return
				}
				this.$store.state.isCurrentNext = true;
				eventBus.$emit('LoadMSTabelData', true);

				if (tempFn.indexOf('ssqcop') != -1) {
					setTimeout(() => {
						this.$store.state.isCurrentFn();
						this.$store.commit("reSetIsCurrent");
					}, 2000);
				} else {
					this.$store.state.isCurrentFn();
					this.$store.commit("reSetIsCurrent");
				}
			});
		},

		//新增/修改 结果要约/次回计划 前验证 6
		async AddResOfferEjectNextTDataMsgApi(type) {
			let E_MST = JSON.parse(localStorage.getItem("E_MST"));
			let dataJson = E_MST;
			if (this.tabs[1].disabled) {
				dataJson.xSsnDate = '';
				dataJson.oxCodName = '';
				dataJson.cxCodName = '';
				dataJson.ixCodName = '';
				dataJson.xConCts1 = '';
				dataJson.xConCts2 = '';
				dataJson.xConCts3 = '';
				dataJson.xConCts4 = '';
			}
			dataJson.type = type;
			dataJson.dmgCode = this.$store.state.macCode;
			dataJson.pltCode = this.$store.state.pltCode == "" ? 0 : this.$store.state.pltCode;
			dataJson.actuAble = 'enable';
			dataJson.updUser = getCookie("user") || 'admin'
			let res = await AddResOfferEjectNextTDataMsg(dataJson);

			return res.data
		},
		//新增/修改 结果要约/次回计划 前验证 5

		async AddResOfferEjectNextODataMsgApi(type) {
			let E_MST = JSON.parse(localStorage.getItem("E_MST"));
			let dataJson = E_MST;
			if (this.tabs[1].disabled) {
				dataJson.xSsnDate = '';
				dataJson.oxCodName = '';
				dataJson.cxCodName = '';
				dataJson.ixCodName = '';
				dataJson.xConCts1 = '';
				dataJson.xConCts2 = '';
				dataJson.xConCts3 = '';
				dataJson.xConCts4 = '';
			}
			dataJson.type = type;
			dataJson.dmgCode = this.$store.state.macCode;
			dataJson.pltCode = this.$store.state.pltCode == "" ? 0 : this.$store.state.pltCode;
			dataJson.actuAble = 'enable';
			dataJson.updUser = getCookie("user") || 'admin'
			let res = await AddResOfferEjectNextODataMsg(dataJson);

			return res.data
		},
		//新增/修改 结果要约/次回计划 前验证 4
		async addResOfferEjectNextDataMsgApi(type) {
			let E_MST = JSON.parse(localStorage.getItem("E_MST"));
			let dataJson = E_MST;
			if (this.tabs[1].disabled) {
				dataJson.xSsnDate = '';
				dataJson.oxCodName = '';
				dataJson.cxCodName = '';
				dataJson.ixCodName = '';
				dataJson.xConCts1 = '';
				dataJson.xConCts2 = '';
				dataJson.xConCts3 = '';
				dataJson.xConCts4 = '';
			}
			dataJson.type = type;
			dataJson.dmgCode = this.$store.state.macCode;
			dataJson.pltCode = this.$store.state.pltCode == "" ? 0 : this.$store.state.pltCode;
			dataJson.actuAble = 'enable';
			dataJson.updUser = getCookie("user") || 'admin'
			let res = await addResOfferEjectNextDataMsg(dataJson);

			return res.data
		},
		//新增/修改 结果要约/次回计划(验证，预先执行) 3
		async addResOfferEjectDataVerifyApi(type) {
			let E_MST = JSON.parse(localStorage.getItem("E_MST"));
			let dataJson = {
				type,
				dmgCode: this.$store.state.macCode,
				ssnDate: E_MST.ssnDate,
				xssnDate: E_MST.xSsnDate,
				oxCodName: E_MST.oxCodName
			}
			if (this.tabs[1].disabled) {
				dataJson.xssnDate = '';
			}
			let res = await addResOfferEjectDataVerify(dataJson)
			// if(res.data.code != 0){
			// 	return ''
			// }
			return res;
		},
		//目视详细 新增/修改/削除前 提示信息获取 2
		async getDelMsg(type) {
			let E_MST = JSON.parse(localStorage.getItem("E_MST"));
			let dataJson = {
				type,	//1新增2，修改，3削除
				dmgCode: this.$store.state.macCode,
				actuNo: E_MST.actuKbn,
				actuKbn: Number(E_MST.actuKbn),
			}
			let res = await offerDetiaMsgTips(dataJson);
			if (res.data.code != 0) {
				return '提示信息获取..'
			}
			return res.data.data;
		},
		//必填项提示信息获取 1
		async offerDetiaRequiredMsgTipsApi(dataJson) {
			let res = await offerDetiaRequiredMsgTips(dataJson);
			if (res.data.code != 0) {
				return '必填项提示信息获取...'
			}
			return res.data.data;
		},

		//新增修改 5
		addResOfferEjectDataApi(type, isSaveBtn) {
			showLoading();
			let E_MST = JSON.parse(localStorage.getItem("E_MST"));
			let dataJson = E_MST;
			if (this.tabs[1].disabled) {
				dataJson.xSsnDate = '';
				dataJson.oxCodName = '';
				dataJson.cxCodName = '';
				dataJson.ixCodName = '';
				dataJson.xConCts1 = '';
				dataJson.xConCts2 = '';
				dataJson.xConCts3 = '';
				dataJson.xConCts4 = '';
			}
			dataJson.type = type;
			dataJson.dmgCode = this.$store.state.macCode;
			dataJson.pltCode = this.$store.state.pltCode == "" ? 0 : this.$store.state.pltCode;
			dataJson.actuAble = 'enable';
			dataJson.updUser = getCookie("user") || 'admin'

			let upDataJson = {
				addResOfferEjectData: dataJson,
				bookAssociationData: this.$refs.tab3.saveFn()
			}

			UpdResOfferEjectBookAssData(upDataJson).then((res) => {
				hideLoading();
				if (res.data.code != 0 || !res) {
					this.$message({
						type: 'error',
						message: res.data.msg
					})
					//  导航条误
					eventBus.$emit('isNavChangeErrorFn');
					//  搜索框索引误
					eventBus.$emit('backParamsForLeftView');
					return
				}

				try {
					var tempFn = null;
					tempFn = this.$store.state.isCurrentFn.toString();
				} catch (error) {
					//
				}

				// 更新成功后的操作
				this.$message.success(
					res.data.msg
				);

				/**
				 * new
				 */
				//	刷新？
				this.$store.state.isCurrentNext = true;
				this.$store.state.threeFlg = dataJson.ssnDate;
				eventBus.$emit('LoadMSTabelData', true);
				//	追加？
				if (tempFn.indexOf('ssqcop') != -1) {
					setTimeout(() => {
						this.$refs.tab1.fatherFn();
					}, 2000);
				}
				//	跳转？
				else if (!isSaveBtn) {
					this.$store.state.isCurrentFn()
					this.$store.commit("reSetIsCurrent");
				}
				return


				if (isSaveBtn) {
					this.$store.state.threeFlg = dataJson.ssnDate;
					eventBus.$emit('LoadMSTabelData', true);
					return
				}
				if (tempFn.indexOf('ssqcop') != -1) {
					eventBus.$emit('LoadMSTabelData', true);
				}

				setTimeout(() => {
					//	123123
					//	追加状态
					if (tempFn.indexOf('ssqcop') != -1) {
						this.$refs.tab1.fatherFn();
						return
					}

					this.$store.state.isCurrentFn()

					this.$store.commit("reSetIsCurrent");

					// this.$store.state.threeFlg = dataJson.ssnDate;
					eventBus.$emit('LoadMSTabelData', true);

				}, 2000);

			})
		},

		getOfferComboxApi() {
			console.log(
				"getOfferComboxApi -=-=-=-=-= getOfferComboxApi -=-=-=-=-=-"
			);
			getOfferCombox().then((res) => {
				this.offerComboxData = res.data.data;
				console.log(
					"getOfferComboxApi -=-=-=-=-= ",
					this.offerComboxData
				);
			});
		},

		onCloseClick() {
			// if (!this.isChange) {
			this.$emit("onCloseClick", false);
			// } else {
			// 	this.save();
			// }
		},
	},
	created() {
		this.getOfferComboxApi();
	},
	mounted() {
		this.getOfferComboxApi();
		// 内容如果变更关闭前询问是否保存
		eventBus.$on("isChangeForMSC", (e) => {
			this.isChange = e;
		})

		eventBus.$on("MSCType", (type) => {
			this.type = type
		})

		//  监听通知，是否有数据变更
		eventBus.$on('getBasicStyleCompontensCurrent_EventBus', () => {
			//	无弹框，不处理
			if (!this.rightViewFlag) {
				// this.$store.commit("changeIsCurrentNext", true);
				return
			}
			// 获取当前数据是否更改。
			this.$store.commit("changeIsCurrentNext", !this.DataChange);
		});

		//  接受通知唤起保存弹框
		eventBus.$on('EventBusBasicStyleCompontensSaveFn', () => {
			if (!this.$store.state.isCurrentFn) {
				return
			}
			this._save();
		});
	},
	beforeDestroy() {

		eventBus.$off('getBasicStyleCompontensCurrent_EventBus');
		eventBus.$off('EventBusBasicStyleCompontensSaveFn');

	},
	destroyed() { },
};
</script>
<style lang="scss" scoped>
.right-cps-view {
	width: 100%;
	height: calc(100% - 2px);
	padding: 16px 0;
	border: 1px solid #c3c3c3;
}

.tbs-view {
	width: 100%;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0 16px;

	button {
		width: 35% !important;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 0;
		border-radius: 0;
		// border: 1px solid #d3d3d3;
		// border-right: 0 none;
		// cursor: pointer;
		// background-color: #FFF;
	}

	// .activeBtn {

	// }
	// button:last-child {
	// 	border-right: 1px solid #d3d3d3;
	// }
	.active-btn-style {
		// background: #106ebe;
		// color: #fff;
	}
}

.container {
	width: 100%;
	height: calc(100% - 32px);
	overflow-y: scroll;
	padding: 12px 8px 28px 16px;
}

.footer-view {
	position: absolute;
	z-index: 10;
	bottom: 5px;
	width: calc(100% - 2px);
	height: 47px;
	padding: 0 15px;
	border-top: 1px solid #d9d9d9;
	display: flex;
	align-items: center;
	background: #ffffff;
	justify-content: space-between;

	button {
		min-width: 82px;
		height: 32px;
		// background: #ffffff;
		// border: 1px solid #d9d9d9;
		margin-right: 12px;
		border-radius: 4px;
	}

	button:nth-child(1) {
		// background: #106ebe;
		// color: #fff;
		padding: 0 15px;
		width: 130px !important;
		border: 0;
	}

	button:nth-child(2) {
		// position: absolute;
		// background: #eb7421;
		// color: #fff;
		right: 0px;
		line-height: 0;
	}
}
</style>